from selenium.webdriver.common.by import By
from base import Base
class Page(Base):
    def kuang(self):
        ele=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜索菜谱")')
        loc=self.find_ele(ele)
        return loc
    def kuang2(self):
        ele = (By.CLASS_NAME, 'android.widget.EditText')
        loc = self.find_ele(ele)
        return loc
    def anniu(self):
        ele = (By.XPATH, '//android.widget.TextView[@text="搜索"]')
        loc = self.find_ele(ele)
        return loc
    # 放大镜
    def fdj(self):
        ele = (By.ID, 'com.xiachufang:id/search_edit_left_search_icon')
        loc = self.find_ele(ele)
        return loc
    # 取消按钮
    def quxiao(self):
        ele = (By.XPATH, '//android.widget.ImageView[@content-desc="清空搜索内容"]')
        loc = self.find_ele(ele)
        return loc
    # 清空按钮
    def qkan(self):
        ele = (By.ID, 'com.xiachufang:id/search_suggest_right_text_view')
        loc = self.find_ele(ele)
        return loc
    # 断言按钮
    def duanayn(self):
        ele = (By.XPATH, '//android.widget.TextView[@text="搜索"]')
        loc = self.find_ele(ele)
        return loc

# 断言清空按钮
    def duanyan2(self):
        ele = (By.ID, 'com.xiachufang:id/search_suggest_right_text_view')
        loc = self.find_ele(ele)
        return loc